package de.ipk_gatersleben.bit.bi.edal.sample.login;

import java.awt.BorderLayout;
import java.io.IOException;

import javax.swing.JEditorPane;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.text.Document;
import javax.swing.text.html.HTMLEditorKit;


public class HtmlViewPanel extends JPanel{
	private static final long serialVersionUID = 1L;
	
	public HtmlViewPanel(String urlpath)
	{
		this.setLayout(new BorderLayout());
		setSize(640, 480);
		
		JEditorPane editorPane = new JEditorPane();
		JScrollPane scrollPane = new JScrollPane(editorPane);
		editorPane.setContentType("text/html");
		editorPane.setEditable(false);
		HTMLEditorKit kit = new HTMLEditorKit();
		editorPane.setEditorKit(kit);
		
			Document doc = kit.createDefaultDocument();
			editorPane.setDocument(doc);
			editorPane.setText(urlpath);
		
		
		this.add(scrollPane, BorderLayout.CENTER);
	}
}
